home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 08 Manslow / CUnconditionalDistribution.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-01  |  1.3 KB  |  51 lines

  1. //Tanks
  2. //Copyright John Manslow
  3. //29/09/2001
  4.  
  5. #ifndef _CUnconditionalDistribution_
  6. #define _CUnconditionalDistribution_
  7.  
  8. class CUnconditionalDistribution
  9. {
  10. public:
  11.     CUnconditionalDistribution(
  12.                             const unsigned long        //Number of bins
  13.                             );
  14.  
  15.     ~CUnconditionalDistribution();
  16.  
  17.     //Called to train the unconditional distribution model. Only needs to be called once because the
  18.     //training procedure is so simple
  19.     void dTrainingStep(            
  20.                                                 const unsigned long,        //Number of training examples
  21.                                                 const double * const        //Pointer to the examples
  22.                                         );
  23.  
  24.     //Returns a sample from the distribution
  25.     double dGetOutputs(void);
  26.  
  27.     //Resets the distribution to be uniform and resets the number of "stored" examples to zero
  28.     void Reset(void);
  29.  
  30.     //Allocate and deallocate memory
  31.     void AllocateMemory(void);        
  32.     void DeallocateMemory(void);
  33.  
  34.     //These variables contain information about the network's structure
  35.     unsigned long ulNumberOfDataPoints;
  36.     unsigned long ulNumberOfBins;
  37.  
  38.     //The performance of the network measured during the dTrainingStep function
  39.     double dBestError;
  40.  
  41.     //Pointers to the probabilities of each of the model's bins
  42.     double *pdBinProbabilities;
  43.  
  44.     //Used to store the time and date when training started
  45.     char *pTrainingStartTime;
  46.     char *pTrainingStartDate;
  47. };
  48.  
  49. #endif
  50.  
  51.